﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HotShot.Service.Entities;
using HotShot.Entities;

namespace HotShot.Service.BusinessLogic.MessageProcessors
{
    // both for broadcast and specific messages
    public class KnownNodesProcessor : MessageProcessorBase
    {
        public override void ProcessMessage(HotShot.Entities.Messages.BaseMessage message, string correlationId)
        {
            var nodeList = message.XmlPayload.FromXml<List<ProcessorNodeDescriptor>>();
            ClusterProcessorLogic.Current.SetKnownNodes(nodeList, false);
        }
    }
}
